#ifndef M_MEDIUM_HOMOGENEOUS
#define M_MEDIUM_HOMOGENEOUS
#include"medium.h"
#include<memory>
using namespace std;
class HomogeneousMedium :public Medium
{
private:
	const Spectrum sigma_a; //absorption
	const Spectrum sigma_s; //scattering
	const Spectrum sigma_t; //attenuation
	const shared_ptr<PhaseFunction> p;
public:
	HomogeneousMedium(const Spectrum &sigma_a, const Spectrum &sigma_s, PhaseFunction* p);
	virtual Spectrum computeAttenuation(Ray &ray, Float t, Float *rands);
	virtual Spectrum sampleMediumInteraction
	(Ray &ray, Float next_surface_t, Float *sampled_t, RandGenerator *randGen);
	virtual P3 sample_inScatterDir(P3 &pt, P3 &wo, Float *pdf, Float *rands);
	virtual Float scatterPdf(P3 &wo, P3 &wi);
};
#endif // !M_MEDIUM_HOMOGENEOUS
